{literal}
<script type="text/javascript">
function checkForm()
{
    title = document.getElementById("playlist_title").value;
    
    if (title == "")
    {
        hideAllErrors();
        document.getElementById("titleError").style.display = "block";
        document.getElementById("playlist_title").select();
        document.getElementById("playlist_title").focus();
        return false;
    } 
    else{
        hideAllErrors();
        jQuery('#create_form').submit();
    }
    return true;
    
}

function hideAllErrors() 
{
    document.getElementById("titleError").style.display = "none"
}
</script>
{/literal}

<div id="main_wrap">
    <div class="center_wrap clearfix">
        <h2 class="no_bottom no_top breadcrumb">
            <a href="javascript:void(0);">Create Playlists</a>
	    </h2>
        {include file="accountmenu.tpl"} 
        <div class="right col1">
            <div class="cat_box_full clearfix" id="browse_main"> 
                {*<p class="right results">{if $error eq ""}{$beginning} - {$ending} {$lang61} {$total} {$lang796}{/if}</p>
                <ul id="search_nav" class="clearfix">
                    <li class="current">{$showtitle}<span></span></li>
                </ul>*}
                <table width="100%" cellspacing="3" cellpadding="3" border="0">
                    <tr>
                        <td valign="top">
                            <h2><span style="float:left;">Create playlist</span></h2>
                        </td>
                    </tr>
					{*<tr>
						<td>
							<a href="{$baseurl}/myplaylist.php">View Playlists</a>
						</td>
					</tr>*}
                    {if $errorPlaylist neq ""}
                        <tr>
                            <td>
                                <div id="smsg" class="errorPage clearfix" style="">
                                    <h2 style="font-size:18px">{$errorPlaylist}</h2>
                                </div>
                            </td>
                        </tr>
                    {/if}   
                </table>    
                <div class="cat_body_full clearfix">
                {*{if $error ne ""}
                {include file="show_error.tpl"}
                {/if}
                {if $message ne ""}
                {include file="show_message.tpl"}
                {/if}*}
                  
                  <!-- LOOP START -->
                  <div id="browse_results">
                
                  <form name="upload_form" id="create_form" action="{$baseurl}/create_playlist.php" method="POST">
            <input type="hidden" name="UPLOAD_IDENTIFIER" id="UPLOAD_IDENTIFIER" value="{$upload_id}" />
            {if $playlist_added eq '1'}
            <div id="smsg" class="errorPage clearfix" style="">
                  <h2 style="font-size:18px">Your playlist has been created successfully.</h2>
            </div>
            {/if}
            <p>
              <label for="title">Title:&nbsp;</label>
                  <input name="playlist_title" id="playlist_title" type="text" value="{$playlist_title|stripslashes}" size="30" /><br />
                <div class="uerror" id="titleError">Error: Playlist title cannot be empty.</div>
            </p>
            <p>
                <input type="button" name="create_button" id="upload_button" value="Create" onClick="checkForm();" />
				<a style="text-decoration:none;" href="{$baseurl}/myplaylist.php"><input type="button" name="cancel_button" id="cancel_button" value="Cancel" /></a>
            </p>
          </form>
                  </div>
                  <!-- LOOP END -->
    
                </div>

              {*  <div class="paginate">
                    {$pagelinks}
                 
                </div>*}
              </div>
        </div>
        <div class="clear"></div>
    </div>
</div>
